package org.thanos.demo.service.impl;

import org.springframework.stereotype.Service;
import org.thanos.demo.model.Demo;
import org.thanos.demo.service.DemoService;

import java.sql.Timestamp;
import java.time.LocalDateTime;

@Service("demoService")
public class DemoServiceImpl implements DemoService {

    @Override
    public Demo hello() {
        Demo demo = new Demo();
        demo.setCurrentDate(Timestamp.valueOf(LocalDateTime.now()));
        return demo;
    }

    @Override
    public Demo helloWorld(Demo demo) {
        demo.setCurrentDate(Timestamp.valueOf(LocalDateTime.now()));
        return demo;
    }
}
